<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>发送通知</title>
    <!-- Bootstrap -->
    <link href="/SmartCommunity/css/pc/bootstrap.css" rel="stylesheet">
	<link href="/SmartCommunity/css/pc/main.css" rel="stylesheet">
  </head>
  <body>
<nav class="navbar navbar-inverse navbar-fixed-top">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
				aria-expanded="false">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand  smart" href="/SmartCommunity/views/pc/smart.html">SMART</a>
		</div>
		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse"
			id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
			</ul>
			<form class="navbar-form navbar-right">
				<a class="btn btn-primary" id="quit">退出</a>
			</form>
		</div>
	</div>
	</nav>
    
	<div class="greywrap-fare">
    <div class="row fare_intro">
      <div class="col-lg-4 callout">
      </div>
      <div class="col-lg-4 callout">
        <span aria-hidden="true" class="glyphicon glyphicon-comment icon"></span>
        <h3>发送催缴费通知</h3>
        <p>实现向所有业主发送缴纳物业费的通知，而且可以向部分未缴纳的业主发送催缴物业费的通知。</p>
      
      </div>
    </div>
     <form role="form" class="form-horizontal">
                <div class="form-group">
                    <label class="col-md-5 control-label" for="type">缴费种类</label>
                    <div class="col-md-2">
                        <select class="form-control" id="select_type">
                            <option value=''>请选择</option>
                        	<option value='1'>物业费</option>
                        	<option value='2'>车位费</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="year" class="control-label col-md-5">缴费年份</label>
                    <div class="col-md-2">
                       <select class="form-control" id="select_year">
                       	 <option value=''>请选择</option>
                       </select>
                    </div>
                </div>  
                <div class="form-group">
                    <div class="col-md-offset-3 col-md-6">
                        <button type="button" onclick="return send_fare()" class="btn btn-primary btn-sm">
                            发  送
                        </button>

                    </div>
                </div>
            </form>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="/SmartCommunity/js/pc/jquery.js"></script>
    <script src="/SmartCommunity/js/pc/init.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="/SmartCommunity/js/pc/bootstrap.js"></script>
     <script src="/SmartCommunity/js/pc/jquery.atmosphere.js"></script>
	<script>
		init();
		var year=new Date().getFullYear();
		for(var i=5;i>0;i--){
			var year1=year+2-i;
			$("#select_year").append("<option value='"+year1+"'>"+year1+"</option>");
		}		
	function send_fare(){
		var year = $("#select_year").val();
		var type = $("#select_type").val();
		if(type==""){
			alert("请选择缴费种类");
			return false;
		}
		if(year==""){
			alert("请选择缴费年份");
			return false;
		}
		$.ajax({
			type : "POST",
			url : "/SmartCommunity/pc/arrear?year="+year+"&type="+type,
			//contentType : "application/json; charset=utf-8",
			success : function(data) {
				alert(data);
				if(data=="true"){
					alert("发送成功");
					$("#select_year").val("");
					$("#select_type").val("");
					}
				else alert("发送失败");
			},
			error : function(data) {
				var arr=eval(data);
				alert(JSON.stringify(arr));
				alert("error");
			}
		});
	}
	</script>
  </body>
</html>